package com.app.dao;

import com.app.dao.entity.Book;

public class BookDAO extends BaseDAO<Long, Book>{

	@Override
	public Book findByID(Long id) {
		return (Book)getSession().get(Book.class, id);
	}

	//
	public Book createBook(String  bookTitle, String bookUrl){
	            Book book = new Book(bookTitle, bookUrl);
	            saveOrUpdate(book);
	            return book;
	}

}
